downloads - lesson 10

Click SWF to play the example. Right-click (or Control-click/Mac) FLA to download the file and see the Timeline, etc.

Note: The slideshow files all use the same seven JPGs. Two caption files are used. One MP3 file is used in several versions. Those files can be viewed individually here.

Note about errors: Read this tip about ActionScript 2.0. If you worked through each exercise in Lesson 10, and everything was working fine until you added Exercise 10.9, try this: (1) Add var n = 0; to the top of the script on Frame 15, and (2) add var before x = new Sound(); -- which was added in Exercise 10.8. Please contact me if this doesn't fix it. See more information about the ActionScript in these two exercises in Lesson 10.

> Slideshow / loadMovieNum (01)
In this exercise (10.1), you script Next and Previous buttons to load photos from outside the Flash movie. This introduces the simplest way to load external files. Only two photos are used in this example.
SWF :: FLA

> Slideshow / loadMovie (02)
In this exercise (10.2), you script Next and Previous buttons to load photos into an empty movie clip. Only two photos are used in this example.
SWF :: FLA

> Slideshow / loadMovie, all photos (03)
In this exercise (10.3), you script the buttons to load all the photos in a set. Seven photos are used in this example. This is a one-frame movie.
SWF :: FLA

> Slideshow / loadMovie, loaded captions (04)
In this exercise (10.4), an external text file is loaded into the Flash movie, and individual captions and credits are extracted from it. Seven photos are used in this example. This is a one-frame movie.
SWF :: FLA

> Slideshow / "Photo loading” message (05)
Sometimes when Flash tries to load an external JPG, there will be a delay. To be considerate of the user, we added a script to check the status of the photo file’s loading process and provide a text message. This way, the user knows nothing is broken if the photo does not appear immediately. Exercise 10.5; one-frame movie. Clear your browser cache before you open this one, if you want to see the loading message.
SWF :: FLA

> Slideshow / LoadVars (06)
In this exercise (10.6), you add frames to handle the loading of the external text file more cautiously.
SWF :: FLA

> Slideshow / Auto-play (07)
In this exercise (10.7), you get rid of the Next and Previous buttons and put this slideshow on auto-pilot. Timing is controlled with setInterval (3 seconds per photo). This is a bit too fast, and it would be easy to change, but for the sake of using the file as an example, fast is good.
SWF :: FLA

> Slideshow / Auto-play with Pause button (07b)
Adds a toggle Pause-Play button to the previous file.
SWF :: FLA

> Slideshow / Sound file and Audio button (08)
In this exercise (10.8), you use techniques from Lesson 8 to play an external MP3 file and control it from the slideshow. A new button allows the user to pause or replay the sound. The photos are not sync'd to the audio.
SWF :: FLA

> Slideshow / Stop on last photo, Replay button (09)
When the slideshow stops, the Pause button changes to a Replay button. This entails two separate buttons that are hidden or revealed depending on which photo is on view in the movie. Each button has a different script on it.
SWF :: FLA

> Slideshow / Fade-in, fade-out movie clip (10)
In this exercise (10.10), the setInterval timer is replaced by a movie clip that provides a fade transition between photos.
SWF :: FLA

> Slideshow BONUS (11)
You can automatically center loaded photos within any defined space on the Stage using the additional script provided in this example. This FLA also includes a script to draw a border line around the photo.
SWF :: FLA :: See different photos in the same SWF: HTML

Download all FLA, JPG, text and MP3 files for this lesson (requires Flash MX or later):
> Windows (.zip) 389 KB
> Mac (.sit) 384 KB